package com.ciaojian.core.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ciaojian.core.mapper.LeaveDetailMapper;
import com.ciaojian.core.model.LeaveDetail;

/**
 * <p>
 * 请假详情表 服务类
 * </p>
 *
 * @author Atlakyn
 * @since 2021-06-09
 */
public abstract class LeaveDetailService<M extends BaseMapper<T>, T> extends ServiceImpl<LeaveDetailMapper, LeaveDetail> {
    /**
     * 根据申请记录ID查询请假详情
     *
     * @param applyId 申请记录ID
     * @return 请假详情
     */
    public LeaveDetail getByApplyId(Integer applyId) {
        return lambdaQuery().eq(LeaveDetail::getApplyId, applyId).one();
    }


}
